Skip to content

Conversation

@jrfnl
Copy link
Member

@jrfnl jrfnl commented Oct 31, 2025

0 is a valid token stack pointer, so in most cases a loosey comparison against false in conditions is dangerous in the context of code for PHPCS.

With that in mind, I propose forbidding it.

`0` is a valid token stack pointer, so in most cases a loosey comparison against `false` in conditions is dangerous in the context of code for PHPCS.

With that in mind, I propose forbidding it.
@jrfnl jrfnl added this to the 1.2.0 milestone Oct 31, 2025
@jrfnl jrfnl merged commit f766a2c into main Oct 31, 2025
3 checks passed
@jrfnl jrfnl deleted the feature/forbid-implicit-boolean-comparisons branch October 31, 2025 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants